package com.example.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mapper.OrderItemMapper;
import com.example.model.OrderItem;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderItemService extends ServiceImpl<OrderItemMapper, OrderItem> {
    //1.根据oid来查询订单，返回商品列表
        public List<OrderItem>  findById(String orderCode){
            QueryWrapper<OrderItem> qw = new QueryWrapper<>();
            qw.eq("order_id",orderCode);

            return this.baseMapper.selectList(qw);
        }
}
